﻿#ifndef POSTCOMMAND_CMDSAVELINECHARTMAINSETTINGDATA_H
#define POSTCOMMAND_CMDSAVELINECHARTMAINSETTINGDATA_H

#include "CommandManager/CommandBase.h"

namespace PostCommand
{
    /// @brief 后处理保存图像命令
    class CmdSaveLineChartMainSettingData : public CommandManager::CommandBase
    {
        Q_OBJECT

    public:
        CmdSaveLineChartMainSettingData();
        ~CmdSaveLineChartMainSettingData();

        bool execute() override;
        void undo() override;
        void redo() override;

        void setLineChartMainSettingData(int mainWindowId, int index, bool axiDisIsAutoName, QString axiDisTitleText, QString axiDisTitleFontColorStr, int axiDisTitleFontSize, QString axiDisAxisColorStr, int axiDisAxisThickness, double axiDisValuePrecision, QString axiDisAxisDigitColorStr, int axiDisAxisDigitSize,
                                         bool axiRangIsAutoRange, double axiRangMaxValue, double axiRangMinValue, bool axiRangIsAutoStepSize, double axiRangCustomStepSize,
                                         bool yAxiDisIsAutoName, QString yAxiDisTitleText, QString yAxiDisTitleFontColorStr, int yAxiDisTitleFontSize, QString yAxiDisAxisColorStr, int yAxiDisAxisThickness, double yAxiDisValuePrecision, QString yAxiDisAxisDigitColorStr, int yAxiDisAxisDigitSize,
                                         bool yAxiRangIsAutoRange, double yAxiRangMaxValue, double yAxiRangMinValue, bool yAxiRangIsAutoStepSize, double yAxiRangCustomStepSize,
                                         bool gridIsMainGridLineDisplay, QString gridMainGridLineColorStr, int gridMainGridLineStyle, double gridMainGridLineThickness, bool gridIsSecondaryGridLineDisplay, QString gridSecondaryGridLineColorStr, int gridSecondaryGridLineStyle, double gridSecondaryGridLineThickness,
                                         QString titleName, QString titleFontColorStr, int titleFontSize,
                                         QString legendFontColorStr, int legendFontSize, QString legendLineColorStr, int legendLineThickness,
                                         QString resultDataName, QString dataLineColorStr, int dataLineStyle, double dataLineThickness, bool isDisplaySymbol, int symbolStyle, double symbolSize, QString symbolColorStr);

    private:
        int m_mainWindowId;
        int m_index;
        bool m_axiDisIsAutoName;
        QString m_axiDisTitleText;
        QString m_axiDisTitleFontColorStr;
        int m_axiDisTitleFontSize;
        QString m_axiDisAxisColorStr;
        int m_axiDisAxisThickness;
        double m_axiDisValuePrecision;
        QString m_axiDisAxisDigitColorStr;
        int m_axiDisAxisDigitSize;
        bool m_axiRangIsAutoRange;
        double m_axiRangMaxValue;
        double m_axiRangMinValue;
        bool m_axiRangIsAutoStepSize;
        double m_axiRangCustomStepSize;
        bool m_yAxiDisIsAutoName;
        QString m_yAxiDisTitleText;
        QString m_yAxiDisTitleFontColorStr;
        int m_yAxiDisTitleFontSize;
        QString m_yAxiDisAxisColorStr;
        int m_yAxiDisAxisThickness;
        double m_yAxiDisValuePrecision;
        QString m_yAxiDisAxisDigitColorStr;
        int m_yAxiDisAxisDigitSize;
        bool m_yAxiRangIsAutoRange;
        double m_yAxiRangMaxValue;
        double m_yAxiRangMinValue;
        bool m_yAxiRangIsAutoStepSize;
        double m_yAxiRangCustomStepSize;
        bool m_gridIsMainGridLineDisplay;
        QString m_gridMainGridLineColorStr;
        int m_gridMainGridLineStyle;
        double m_gridMainGridLineThickness;
        bool m_gridIsSecondaryGridLineDisplay;
        QString m_gridSecondaryGridLineColorStr;
        int m_gridSecondaryGridLineStyle;
        double m_gridSecondaryGridLineThickness;
        QString m_titleName;
        QString m_titleFontColorStr;
        int m_titleFontSize;
        QString m_legendFontColorStr;
        int m_legendFontSize;
        QString m_legendLineColorStr;
        int m_legendLineThickness;
        QString m_resultDataName;
        QString m_dataLineColorStr;
        int m_dataLineStyle;
        double m_dataLineThickness;
        bool m_isDisplaySymbol;
        int m_symbolStyle;
        double m_symbolSize;
        QString m_symbolColorStr;
    };
} // namespace PostCommand

#endif
